package com.fz.mapper;

import com.fz.entity.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by webrx on 2017-09-04.
 */
public interface StudentMapper {
    @Select("select * from  my_student")
    public List<Student> queryAll();

    @Delete("delete from my_student where sid=#{id}")
    public int deleteById(int id);

    @Insert("insert into my_student (sname,score,saddress)values(#{sname},#{score},#{saddress})")
    public int insert(Student stu);

    public int update(Student stu);
    @Select("select * from my_student where sid=#{id}")
    public Student queryByid(int id);
}
